Thanks to Syzygy, for the original doors pkg.
Thanks to Zulu, I used his changes code as a reference.
And thanks to Dundee, for many many helpful comments on the scripting list, and
for the unlock/open/relock code.
Unless Syzygy objects, I'll take over maintaining this code-
  he's got plenty to deal with as it is.

This package removes all the core function calls from door functionality. It
includes working wooden and metal gates. 
It adds a new doortype: stone. Stone doors make the same noise as metal ones
by default. There are no stone doors at the moment, but soon I will add dungeon
secret doors to the itemdesc and release that. 
By default any door's open graphic is its closed graphic +1. If you choose to 
make a door for which this is not the case, set its cprop opengraphic to the
decimal number of its open graphic. I added that code to the functionality
believing I might need it to get all the gates working. Turned out not to help,
but I left it in. Might use it for secret doors.

There is one gate of each type that, when opening, does not change position. I
believe that it will still prevent players from passing through it, as a solid
object still remains in that tile. These gates are:
0x0829, 0x0851, 0x0845, 0x0872. They are all east facing gates with hinges on
the left side opening counterclockwise.